/*
 *  $Id: Hit.cs 898 2009-11-28 16:12:26Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Affects {
    /// <summary>
    /// Эффект: событие удара
    /// Параметры: обработчик события и выборка событий
    /// </summary>
    public class OnHit: Event<HitEvent> {
        public OnHit(HitEvent handler, AffectSummaryType sumTypes): base(handler, sumTypes) {}

        public override string Id {
            get { return "event.hit"; }
        }

        public override Affect Clone() {
            return new OnHit(Handler, SumTypes);
        }

        public override void SetEvent(AffectSummary summary) {
            summary.OnHit += Handler;
        }
        public override void ResetEvent(AffectSummary summary) {
            summary.OnHit -= Handler;
        }
    }
}